import myaxios from "../MyAxios";
import BaseUrl from "../BaseUrl";
const { BMDURL} =BaseUrl
const directorApi={
    /**
     * 添加导演
     * @param {*} params 
     */
    add(params){
        return myaxios.post(BMDURL+'/movie-director/add',params)
    },
    /**
     * 删除导演
     * @param {*} params 
     */
    delete(params){
        return myaxios.post(BMDURL+'/movie-director/del',params)
    },
    /**
     * 通过姓名模糊查询导演
     * @param {*} params 
     */
    queryNameLike(params){
        return myaxios.post(BMDURL+'/movie-directors/name',params)
    },
    /**
     * 查询所有导演
     */
    queryAll(){
        let params = { page: 1, pagesize: 27 };
       return myaxios.get(BMDURL+'/movie-directors',params)
    }
}

export default directorApi